package com.eu.ebpm.engine.pvm;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.eu.ebpm.engine.cmd.pvm.ForkAfterIntoCommand;
import com.eu.ebpm.engine.entity.deploy.Mission;
import com.eu.ebpm.engine.entity.runtime.TaskEntity;

/**
 * 
 * 类名称: ForkAfterService
 * 类描述: 
 * @author 王晓华
 * @since 2015-1-24 下午11:34:35
 * @version v1.0
 */
@Component
public class ForkAfterService extends PvmEngine implements EngineService {

	@Autowired
	private ForkAfterIntoCommand forkAfterIntoCommand;
	
	public void into(Mission mission, TaskEntity task, Map<String, Object> variables) {
		Mission next = forkAfterIntoCommand.execute(mission, task, variables);
		if(next != null)
			this.pvmContainer.getPvmServices().get(next.getType()).execute(next, task, null);
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	

	
	
}
